import java.util.Scanner;

public class Day_31_1_美国节日 {
    private static int dayOfWeek(int year, int month, int day) {
        if(month == 1 || month == 2) {
            month += 12;
            year -= 1;
        }
        int century = year / 100;
        year %= 100;
        int week = year + (year / 4) + (century / 4) - 2 * century + 26 * (month + 1) / 10 + day - 1;
        week = (week % 7 + 7) % 7;

        if(week == 0) {
            week = 7;
        }
        return week;
    }

    private static int dayOfDemand(int year, int month, int count, int d_of_week) {
        int week = dayOfWeek(year, month, 1);
        int day = 1 + (count - 1) * 7 + (7 + d_of_week - week) % 7;
        return day;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            int year = scan.nextInt();
            holidayOfUsa(year);
            System.out.println();
        }
    }
    private static void holidayOfUsa(int year) {
        new_year_day(year);
        martin_luther_king_day(year);
        president_day(year);
        memorial_day(year);
        independence_day(year);
        labor_day(year);
        thanks_giving_day(year);
        christmas(year);
    }

    // 元旦
    private static void new_year_day(int year) {
        System.out.println(year+"-01-01");
    }
    // 马丁·路德·金纪念日（1月的第三个星期一）
    private static void martin_luther_king_day(int year) {
        System.out.println(year+"-01-"+
                dayOfDemand(year,1,3,1));
    }
    // 总统日（2月的第三个星期一）
    private static void president_day(int year) {
        System.out.println(year+"-02-"+
                dayOfDemand(year,2,3,1));
    }
    // 阵亡将士纪念日（5月的最后一个星期一）
    private static void memorial_day(int year) {
        int week = dayOfWeek(year,6,1);
        int day = 31 - ((week == 1) ? 6 : (week - 2));
        System.out.println(year+"-05-"+day);
    }
    // 国庆
    private static void independence_day(int year) {
        System.out.println(year+"-07-04");
    }
    // 劳动节（9月的第一个星期一）
    private static void labor_day(int year) {
        System.out.println(year+"-09-0"+
                dayOfDemand(year,9,1,1));
    }
    // 感恩节（11月的第四个星期四）
    private static void thanks_giving_day(int year) {
        System.out.println(year+"-11-"+
                dayOfDemand(year,11,4,4));
    }
    // 圣诞节
    private static void christmas(int year) {
        System.out.println(year+"-12-25");
    }
}
